<script>
import dialog from '/@/mixins/dialog';
export default {
	name: 'VideoPreview',
	props: {
		src: {
			type: String,
			default: '',
		},
	},
	mixins: [dialog],
};
</script>
<template>
	<div class="VideoPreview">
		<el-dialog :close-on-click-modal="closeOnClickModal" :destroy-on-close="true" title="视频预览" v-model="visible" width="800px">
			<div class="content_wrap">
				<video :src="src" autoplay="autoplay" controls="controls" loop="loop"></video>
			</div>
			<template #footer>
				<span class="dialog-footer">
					<el-button type="primary" @click="visible = false">关 闭</el-button>
				</span>
			</template>
		</el-dialog>
	</div>
</template>

<style lang="scss" scoped>
.VideoPreview {
	video {
		width: 100%;
	}
}
</style>
